using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class StartPanel :BasePanel
{
    static readonly string path = "UI/Panel/StartPanel";
    public StartPanel() : base(new UIType(path)) { }
    public override void OnEnter()
    {
        uitool.GetOrAddComponentInChildren<Button>("PlayButton").onClick.AddListener(() =>
        {
            GameRoot.Instance.scenesystem.SetScene(new SkillChoose());
        });
        uitool.GetOrAddComponentInChildren<Button>("ExitButton").onClick.AddListener(() =>
        {
#if UNITY_EDITOR
            UnityEditor.EditorApplication.isPlaying = false;
#else
                 Application.Quit();
#endif
        });
    }
}
